
using UnityEngine;
using Verse;
using RimWorld;
using System;

namespace RimZombieGirl
{
    public class CompProperties_FireOverlayExt : CompProperties_FireOverlay
    {

        public GraphicData graphicData;

        private Graphic getFireGraphic()
        {
            return GraphicDatabase.Get<Graphic_Flicker>(graphicData.texPath, ShaderDatabase.TransparentPostLight, Vector2.one, graphicData.color);
        }

        public override void DrawGhost(IntVec3 center, Rot4 rot, ThingDef thingDef, Color ghostCol, AltitudeLayer drawAltitude, Thing thing = null)
        {
            Graphic graphic = GhostUtility.GhostGraphicFor(getFireGraphic(), thingDef, ghostCol);
            Vector3 loc = center.ToVector3ShiftedWithAltitude(drawAltitude) + thingDef.graphicData.DrawOffsetForRot(rot) + DrawOffsetForRot(rot);
            graphic.DrawFromDef(loc, rot, thingDef);
        }
    }
}